<!--{eval 
	$_G['home_tpl_titles'] = array('{lang invite_friend}');
}-->
<!--{template common/header}-->
<!--{if $_GET['op'] == 'resend'}-->

<h3 class="flb">
	<em id="return_$_G[gp_handlekey]">{lang send_mail_again}</em>
	<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<form id="resendform_{$id}" name="resendform_{$id}" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=invite&op=resend&id=$id" {if $_G[inajax]}onsubmit="ajaxpost(this.id, 'return_$_G[gp_handlekey]');"{/if}>
	<input type="hidden" name="referer" value="$_G[referer]" />
	<input type="hidden" name="resendsubmit" value="true" />
	<!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_G[gp_handlekey]" /><!--{/if}-->
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<div class="c">{lang sure_resend}</div>
	<p class="o pns">
		<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang resend}</strong></button>
	</p>
</form>
<script type="text/javascript">
	function succeedhandle_$_G[gp_handlekey](url, msg, values) {
		if(typeof resend_mail == 'function' && parseInt(values['id'])) {
			resend_mail(values['id']);
		}
	}
</script>
<!--{elseif $_GET['op'] == 'delete'}-->
<h3 class="flb">
	<em id="return_$_G[gp_handlekey]">{lang delete_log}</em>
	<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<form id="deleteform_{$id}" name="deleteform_{$id}" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=invite&op=delete&id=$id" {if $_G[inajax]}onsubmit="ajaxpost(this.id, 'return_$_G[gp_handlekey]');"{/if}>
	<input type="hidden" name="referer" value="$_G[referer]" />
	<input type="hidden" name="deletesubmit" value="true" />
	<!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_G[gp_handlekey]" /><!--{/if}-->
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<div class="c">{lang delete_log_message}</div>
	<p class="o pns">
		<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang delete}</strong></button>
	</p>
</form>
<script type="text/javascript">
	function succeedhandle_$_G[gp_handlekey](url, msg, values) {
		if(typeof resend_mail == 'function' && parseInt(values['id'])) {
			resend_mail(values['id']);
		}
	}
</script>
<!--{else}-->


<div id="pt" class="wp"><a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo; <a href="home.php">$_G[setting][navs][4][navname]</a> &rsaquo; {lang friends}</div>

<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a></label>
		</div>

		<div class="bm">
			<h1 class="mt"><img alt="friend" src="{STATICURL}image/feed/friend.gif" class="vm" /> {lang friends}</h1>
			<ul class="tb cl">
				<li><a href="home.php?mod=space&uid=$space[uid]&do=friend">{lang friend_list}</a></li>
				<li><a href="home.php?mod=spacecp&ac=search">{lang search_friend}</a></li>
				<li><a href="home.php?mod=spacecp&ac=friend&op=find">{lang people_might_know}</a></li>
				<li class="a"><a href="home.php?mod=spacecp&ac=invite">{lang invite_friend}</a></li>
				<li><a href="home.php?mod=spacecp&ac=friend&op=request">{lang friend_request}</a></li>
				<li><a href="home.php?mod=space&do=top">{lang friend_top}</a></li>
			</ul>

<!--{if $allowinvite}-->
			<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=invite&appid=$appid&ref">
				<!--{if $config[inviteaddcredit] || $config[invitedaddcredit]}-->
				<p class="tbmu">
					{lang friend_invite_success}
					<!--{if $config[invitedaddcredit]}-->{lang you_get} <strong class="xi1">$config[invitedaddcredit]</strong> {lang unit}{$credittitle},<!--{/if}-->
					<!--{if $config[inviteaddcredit]}-->{lang friend_get} <strong class="xi1">$config[inviteaddcredit]</strong> {lang unit}{$credittitle},<!--{/if}-->
					{lang go_nuts}
				</p>
				<!--{/if}-->
				<table cellspacing="0" cellpadding="0" width="100%" class="tfm mbm">
					<caption class="cl">
					<!--{if $appid}-->
						<div class="avt z" style="margin-right: 5px;"><img src="http://appicon.manyou.com/logos/{$appid}" alt="{$appinfo[appname]}" /></div>
						<h2 class="wx">{lang friend_invite_play}$appinfo[appname]</h2>
					<!--{else}-->
						<h2 class="wx">{lang friend_invite_link}</h2>
					<!--{/if}-->
						<p>{lang friend_invite_message}</p>
					</caption>
					<!--{if $creditnum}-->
					<tr>
						<td colspan="2">
							<!--{if $list}-->
							<p class="d">{lang click_link_copy}</p>
							<ol style="margin-left: 27px;">
								<!--{loop $list $key $url}-->
								<li><a href="$url" onclick="javascript:setCopy('$url', '{lang copy_invite_link}');return false;">$url</a></li>
								<!--{/loop}-->
							</ol>
							<!--{else}-->
							{lang no_invitation_code}
							<!--{/if}-->
						</td>
					</tr>
					<tr>
						<td>
							<p>{lang invitation_code_spend}{$credittitle} <strong class="xi1">$creditnum</strong> $unit  ( {lang you_have}$credittitle<strong>{$space[$creditname]}</strong>$unit )</p>
							<!--{if $_G['group']['maxinviteday']}-->
							<p class="d">{lang max_invite_day_message}</p>
							<!--{/if}-->
							<input type="text" name="invitenum" value="1" size="5" class="px vm" />
							<button type="submit" name="invitesubmit" value="true" class="pn vm"><em>{lang get_invitation_code}</em></button>
						</td>
					</tr>
					<!--{else}-->
					<tr>
						<td>
							<a onclick="javascript:setCopy('$inviteurl', '{lang copy_invite_link}');return false;" href="$inviteurl" class="xw1">$inviteurl ({lang copy})</a>
						</td>
					</tr>
					<!--{/if}-->
				</table>
			<!--{if $_G['group']['allowmailinvite']}-->
				<input type="hidden" name="formhash" value="{FORMHASH}" />
			</form>
			<hr class="da" style="margin: 0;" />
			<script type="text/javascript" src="http://widgets.manyou.com/misc/scripts/ab.js" charset="utf-8"></script>
			<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=invite&type=mail&appid=$appid&ref">
				<table cellspacing="0" cellpadding="0" class="tfm mbm">
					<caption>
						<h2 class="wx">{lang send_invitation_email}<!--{if $appid}-->{lang friend_play_together}$appinfo[appname]<!--{/if}--></h2>
						<p>{lang send_invitation_email_message}</p>
					</caption>
					<tr>
						<td>
							<p class="d">
								<a class="mbn y" href="#" onclick="MYABC.showChooser('email', '{$uri}api/manyou/getmaillist.htm', null, false, false, null); return false"><img src="http://widgets.manyou.com/misc/images/ab/ab_button.gif" alt="{lang add_from_address_book}" /></a>
								{lang friend_email_address}
							</p>
							<textarea name="email" id="email" rows="3" class="pt" style="width:95%;"></textarea>
						</td>
					</tr>
					<tr>
						<td>
							<p class="d">{lang friend_to_say}</p>
							<input type="text" name="saymsg" id="saymsg" onkeyup="showPreview(this.value, 'sayPreview')" class="px" style="width:95%;">
						</td>
					</tr>
					<tr>
						<td><button type="submit" name="emailinvite" value="true" class="pn pnp"><strong>{lang invite}</strong></button></td>
					</tr>
				</table>
				<hr class="da" style="margin: 0;" />
				<table cellspacing="0" cellpadding="0" width="100%" class="tfm" style="table-layout: fixed;">
					<caption>
						<h2 class="wx">{lang preview_invitation}</h2>
					</caption>
					<tr>
						<td valign="top" width="140"><div class="avt avtm">{$mailvar[avatar]}</div></td>
						<td valign="top">
						<!--{if $appid}-->
							<h4>{lang i_play_invite_you}</h4>
						<!--{else}-->
							<h4>{lang hi_iam_invite_you}</h4>
							<p class="mtm">{lang become_friend_message}<p>
						<!--{/if}-->
							<p class="mtm">{lang invite_add_note}:</p>
							<p id="sayPreview" class="exfm" style="width: 420px;"></p>
							<h4 class="mtm">{lang click_link_become_friend}<!--{if $appid}-->{lang play_together}$appinfo[appname]<!--{/if}-->:</h4>
							<p>{$inviteurl}</p>
							<h4 class="mtm">{lang have_account_view_homepage}</h4>
							<p>{$mailvar[siteurl]}home.php?mod=space&uid=$mailvar[uid]</p>
						</td>
					</tr>
				</table>
				<input type="hidden" name="formhash" value="{FORMHASH}" />
			</form>
			<!--{/if}-->

<!--{else}-->
			<div class="emp">{lang no_right_invite_friend}</div>
<!--{/if}-->
		</div>
	</div>

	<div class="sd">
		{subtemplate common/userabout}

		<!--{if $flist}-->
		<div class="bn">
			<h2>{lang invited_friend}</h2>
			<!--{if count($flist) < 24}-->
			<ul class="ml mls cl">
				<!--{loop $flist $key $value}-->
				<li>
					<div class="avt"><a href="home.php?mod=space&uid=$value[fuid]"><!--{avatar($value[fuid],small)}--></a></div>
					<p><a href="home.php?mod=space&uid=$value[fuid]" title="$value[fusername]">$value[fusername]</a></p>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{else}-->
			<p>
			<!--{eval $mod='';}-->
			<!--{loop $flist $key $value}-->
			$mod<a href="home.php?mod=space&uid=$value[fuid]" title="$value[fusername]">$value[fusername]</a>
			<!--{eval $mod=', ';}-->
			<!--{/loop}-->
			</p>
			<!--{/if}-->
		</div>
		<hr class="da" />
		<!--{/if}-->

		<!--{if $maillist}-->
		<div class="bn">
			<h2>{lang no_invite_friend_email}</h2>
			<ul class="xl xl1">
				<!--{loop $maillist $key $value}-->
				<li id="sendmail_$value[id]_li">
					<em>
						<a href="home.php?mod=spacecp&ac=invite&op=resend&id=$value[id]&handlekey=resendinvitehk_{$value[id]}" id="mail_invite_$value[id]" onclick="showWindow(this.id, this.href, 'get', 0);" title="{lang resend}">{lang resend}</a>
						<a href="javascript:;" title="{lang link}" onclick="javascript:setCopy('$value[url]');return false;">{lang link}</a>
						<a href="home.php?mod=spacecp&ac=invite&op=delete&id=$value[id]&handlekey=deleteinvitehk_{$value[id]}" id="del_invite_$value[id]" onclick="showWindow(this.id, this.href, 'get', 0);" title="{lang delete}">{lang delete}</a>
					</em>
					$value[email]
				</li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->


	</div>
</div>

<!--{/if}-->
<!--{template common/footer}-->
